package com.why.entity;

import java.util.ArrayList;
import java.util.List;

public class EasyUiTree {

	String id;
	String text;
	List<Object> children;
	String attribuate;
	String attributes;
	
	String path;
	public String getPath() {
		return path;
	}

	public String getAttributes() {
		return attributes;
	}

	public void setAttributes(String attributes) {
		this.attributes = attributes;
	}

	public void setPath(String path) {
		this.path = path;
	}
	String iconCls;
	String upid;
	
	public String getUpid() {
		return upid;
	}

	public void setUpid(String upid) {
		this.upid = upid;
	}

	public EasyUiTree(){
		
	}
	
	public EasyUiTree(String id,String text){
		this.id=id;
		this.text=text;
	}
	
	public EasyUiTree(String id,String text,String attr){
		this(id,text);
		this.attribuate=attr;
	}
	
	public boolean hasChildren(){
		if(children == null)
			return false;
		return children.size()>0;
	}
	
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getText() {
		return text;
	}
	public void setText(String text) {
		this.text = text;
	}
	public List<Object> getChildren() {
		return children;
	}
	public void setChildren(List<Object> children) {
		this.children = children;
	}
	public void addChild(Object child){
		if(this.children == null)
			this.children = new ArrayList<Object>();
		this.children.add(child);
	}
	public String getAttribuate() {
		return attribuate;
	}
	public void setAttribuate(String attribuate) {
		this.attribuate = attribuate;
	}
	public String getIconCls() {
		return iconCls;
	}
	public void setIconCls(String iconCls) {
		this.iconCls = iconCls;
	}
	
	
}
